<?php get_header(); ?>
  <!-- content start -->
<div id="content">
  <?php get_sidebar(); ?>
  <!-- maincontent start -->
  <div id="maincontent"> 
  <?php if(have_posts()) : ?>
  <?php while(have_posts()) : the_post(); ?>
  <div class="post">
    <div class="title" >
      <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
        <?php the_title(); ?>
        </a></h2>
      <div class="postmetadata"><span class="author">Author:<?php the_author(); ?></span> <span class="date"><?php the_time('F jS, Y') ?></span> <span class="cat">Cat:<?php the_category(' ,') ?></span></div>
    </div>
    <div class="entry">
      <?php the_excerpt(); ?>
      <div class="clearfix"></div>
      <p class="tags"><?php the_tags() ?></p>
      <p class="commentline"> <a href="<?php comments_link(); ?>"> Read Users' Comments (
        <?php comments_number('0','1','%'); ?>
        ) </a> </p>
    </div>
  </div>
  <?php endwhile; ?>
    <?php
	include('pagenavi.php');
	if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
?>
  <?php else : ?>
  <div class="notfound">
    <p>File Not Found!</p>
    <p>Please try again.</p>
  </div>
  <?php endif; ?>
</div>
  <!-- maincontent end -->
</div>
<!-- content end -->
<div style="clear:both"></div>

<?php get_footer(); ?>
